﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace df
{
    public partial class reg : share
    {
        public reg()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Dispose();
        }
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (password.Text != password_confirm.Text)
            {
                err.Text = "两次输入的密码不一样";
            
                return;
            }

            var para = new Dictionary<string, object>();
            para.Add("nm", name.Text);
            para.Add("pw", password.Text);
            var rt = post(config.api_reg, para);
            if (rt != null )
            {
                err(err, rt["msg"].ToString());
                if (rt["status"].ToInt32() > 0)
                {
                    DialogResult = DialogResult.OK;
                }
                

                
            }


        }
    }
}
